<template>
  <div class="px-[16px] pt-[16px] bg-[var(--base-dialog-bg-color)] rounded-[8px]">
    <FormTitle title="付款信息" />
    <el-descriptions :column="3">
      <el-descriptions-item label="物流商付款单号:">{{
        data?.logistics_pay_number || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="物流商名称:">{{
        data?.logistics_name || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label=" "></el-descriptions-item>
      <el-descriptions-item label="申请项目:">{{
        data?.rp_type_text ||"-"
      }}</el-descriptions-item>
      <el-descriptions-item label="付款账户:">{{
        data?.pay_account_name || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="银行账号:">{{
        data?.pay_bank_account || "-"
      }}</el-descriptions-item>
      <!-- <el-descriptions-item label="付款币种:">{{
        data?.pay_currency || "-"
      }}</el-descriptions-item> -->
      <el-descriptions-item label="付款主体公司:">{{
        data?.pay_main_company_name || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="结算类型:">{{
        data?.settle_type_text || "-"
      }}</el-descriptions-item>
      <!-- <el-descriptions-item label="期待付款日期:">{{
        data?.expected_pay_date || "-"
      }}</el-descriptions-item> -->
      <el-descriptions-item label="付款方式:">{{
        data?.pay_type_text || "-"
      }}</el-descriptions-item>
      <!-- <el-descriptions-item label=" "></el-descriptions-item> -->
      <!-- <el-descriptions-item label="应付金额:">{{
        data?.pay_amount || "-"
      }}</el-descriptions-item> -->
      <!-- <el-descriptions-item label="申付金额:">{{
        data?.req_amount || "-"
      }}</el-descriptions-item> -->
      <el-descriptions-item label="人民币金额:">{{
        data?.req_amount_cny || "-"
      }}</el-descriptions-item>
      <!-- <el-descriptions-item label="实付总金额(CNY):">{{
        data?.pay_total_amount_cny || "-"
      }}</el-descriptions-item> -->
      <!-- <el-descriptions-item label="汇率:">{{
        data?.exchange_rate || "-"
      }}</el-descriptions-item> -->
      <el-descriptions-item label="来源:">{{
        data?.source_type_text || "-"
      }}</el-descriptions-item>

      <!-- <el-descriptions-item label="实付总金额(付款币种):">{{
        data?.pay_total_amount || "-"
      }}</el-descriptions-item> -->
      <el-descriptions-item label="申请人:">{{
        data?.create_user_name || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="期望付款时间:">{{
        data?.expected_pay_date || "-"
      }}</el-descriptions-item>
      <!-- <el-descriptions-item label="支付账号:">{{
        data?.pay_account || "-"
      }}</el-descriptions-item> -->
    </el-descriptions>

    <el-descriptions :column="1">
      <el-descriptions-item label="物流备注:">{{
        data?.logistics_remark || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="财务备注:">{{
        data?.finance_remark || "-"
      }}</el-descriptions-item>
      <el-descriptions-item label="附件:">
        <el-link
          :underline="false"
          type="primary"
          @click="handleLink(data?.attachments?.oss_path || null)"
        >
          {{ data?.attachments?.source_name || "-" }}
        </el-link>
      </el-descriptions-item>
      <el-descriptions-item label="付款凭证:">
        <el-link
          :underline="false"
          type="primary"
          @click="handleLink(data?.pay_receipts?.oss_path || null)"
        >
          {{ data?.pay_receipts?.source_name || "-" }}
        </el-link>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script setup>
import FormTitle from "@/components/Form/FormTitle.vue";
const props = defineProps({
  data: { type: Object, default: () => ({}) },
});
const { data } = toRefs(props);
const handleLink = (_link) => {
  if (!_link) return;
  window.open(_link, "noopener", "noreferrer");
};
</script>

<style lang="scss" scoped>
:deep(.el-descriptions__label) {
  display: inline-block;
  width: 140px;
  text-align: right;
  color: var(--base-placeholder-text-color);
}
:deep(.el-descriptions__content) {
  color: var(--base-text-color);
}
</style>
